/**
 * Copyright (C) T-Systems International, 2013-2014
 *
 * The copyright of the computer program herein is the property of
 * T-Systems International. The program may be used and/or copied
 * only with the written permission of T-Systems International or in
 * accordance with the terms and conditions stipulated in the
 * agreement/contract under which the program has been supplied.
 *
 * $Author$
 * $Date$
 * $Rev$
 */
package com.tsystems.migdb.batch.listener;

import com.tsystems.migdb.batch.Person;
import lombok.extern.log4j.Log4j2;
import org.springframework.batch.core.SkipListener;

@Log4j2
public class MigdbSkipListener implements SkipListener<Person, Person> {

    @Override
    public void onSkipInRead(Throwable t) {
        log.error("an item has been skipped: " + t.toString());
    }

    @Override
    public void onSkipInWrite(Person item, Throwable t) {
        log.error("an item has been skipped on writing: " + item, t);
    }

    @Override
    public void onSkipInProcess(Person item, Throwable t) {
        log.error("an item has been skipped on processing: " + item, t);
    }

}